"""

^ 起始

$ 结束

"""

import re

str1 = 'http://www.baidu.com'

# str1 = 'ufaoia77789bureiwotu'
# p = 'a\w+b'
# p = r'(?P<namea>a+)(b+)(?P=namea)'
p = r'^http:.+.com$'
a = re.search(p, str1)
print(a.group())
